import java.util.Arrays;

public class J2411081 {
    public static void main(String[] args) {
        int[] array = new int[20];
        int[] array1 = new int[10];
        for (int i = 0; i < 10; i++) {
            array[i] = i;
        }
        array1[0] = 13;
        array1[1] = 12;
        array1[2] = 11;
        array1[3] = 18;
        array1[4] = 19;
        array1[5] = 20;
        array1[6] = 14;
        array1[7] = 21;
        array1[8] = 29;
        array1[9] = 23;
        for (int i = 0; i < array.length-10; i++) {
            array[i+10] = array1[i];
        }
        paxu paxu = new paxu();
        paxu.pai(array);
        System.out.println(Arrays.toString(array));
    }
}
class paxu{
    public int[] pai(int[] array){
        for (int i = 0; i < array.length-1; i++) {
              if(array[i] > array[i+1]){
                  int val = array[i];
                  array[i] = array[i+1];
                  array[i+1] = val;
              }
        }return array;
    }
}
